<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>${SYSTEM_NAME}</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/layui/css/layui.css?v=${FILE_VERSION}" media="all">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/style/admin.css?v=${FILE_VERSION}" media="all">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/js/zTree_v3/css/metroStyle/metroStyle.css?v=${FILE_VERSION}" type="text/css">
</head>
<body>
<div class="layui-fluid">
	<div class="layui-card">
		<div class="layui-card-body" style="padding: 15px;">
		<form class="layui-form" action="${pageContext.request.contextPath}/sys/paramRegion/save" style="width:80%" method="post" id="basicform">
			<input type="hidden" id="id" name="id" value="${paramRegion.id }"/>
			<C:if test="${not empty(paramRegion.parentId)}">
			  <div class="layui-form-item">
				<label class="layui-form-label">父类名称</label>
				<div class="layui-input-inline">
					<div class="layui-input-inline">
						<input type="hidden" id="parentId" name="parentId" value="${paramRegion.parentId}">
						<input type="text" class="layui-input" disabled="disabled" value="${paramRegion.parentName}">
					</div>
				</div>
			</div>
			</C:if>
			<div class="layui-form-item">
				<label class="layui-form-label layui-form-required">地域名称</label>
				<div class="layui-input-inline">
					<input name="name" placeholder="请输入地域名称" class="layui-input"
						   required lay-verify="required"
						   lay-verType="tips" value="${paramRegion.name }"/>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label layui-form-required">地域编码</label>
				<div class="layui-input-inline">
					<input name="cityCode" placeholder="请输入地域编码" class="layui-input"
						   required lay-verify="required"
						   lay-verType="tips" value="${paramRegion.cityCode }"/>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">地域简称</label>
				<div class="layui-input-inline">
					<input name="shortName" placeholder="请输入地域简称" class="layui-input"
						   lay-verType="tips" value="${paramRegion.shortName }"/>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">地域邮编</label>
				<div class="layui-input-inline">
					<input name="zipCode" placeholder="请输入地域邮编" class="layui-input"
						   lay-verType="tips" value="${paramRegion.zipCode }"/>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">地域经度</label>
				<div class="layui-input-inline">
					<input name="longitude" placeholder="请输入地域经度" class="layui-input"
						   lay-verType="tips" value="${paramRegion.longitude }"/>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">地域纬度</label>
				<div class="layui-input-inline">
					<input name="latitude" placeholder="请输入地域纬度" class="layui-input"
						   lay-verType="tips" value="${paramRegion.latitude }"/>
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label layui-form-required">排序</label>
				<div class="layui-input-inline">
					<input name=sort placeholder="请输入排序" lay-verify="required|number" type="number"
						   class="layui-input" value="${paramRegion.sort }" maxlength="100">
				</div>
			</div>
		  
		  <div class="layui-form-item">
		    <div class="layui-input-block">
		      <button class="layui-btn" type="button" lay-submit="" lay-filter="sub">立即提交</button>
		      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
		      <button type="button" class="layui-btn layui-btn-danger" onclick="closed()">关闭</button>
		    </div>
		  </div>
		</form>
  	  </div>
  </div>
</div>
<script src="${pageContext.request.contextPath}/static/js/common-2.0.0.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/layuiadmin/layui/layui.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/js/jquery-3.3.1.min.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/js/common/coreTree-2.0.0.js?v=${FILE_VERSION}"></script>
<script>
	layui.config({
		base: getContextPath() + '/static/layuiadmin/' //静态资源所在路径
	}).extend({
		index: 'lib/index' //主入口模块
	}).use(['form'], function() {
		layui.form.on('submit(sub)', function(data){
			return saveOrUpdate($("#id").val(),"/sys/paramRegion",data);
		});
	});

</script>
</body>
</html>